package app.r_teenus.backend.dao;

import java.util.List;

import app.r_teenus.backend.model.Address;
import app.r_teenus.backend.model.Contact;
import app.r_teenus.backend.model.Person;


public interface PersonDao extends DefaultDao {

	public List<Person> findPersons();

	/**
	 * Find person by id.
	 */
	public Person findPersonById(Integer id);

	/**
	 * Saves person.
	 */
	public Person save(Person person);

	/**
	 * Saves address to person by adding or updating record.
	 */
	public Person saveAddress(Person person, Address address);

	/**
	 * Saves contact to person by adding or updating record.
	 */
	public Person saveContact(Person person, Contact contact);

	/**
	 * Deletes address.
	 */
	public Person deleteAddress(Person person, Integer addressId);

	/**
	 * Deletes contact.
	 */
	public Person deleteContact(Person person, Integer contactId);

	/**
	 * Deletes person.
	 */
	public void delete(Person person);

}
